package com.example.flowableoa.delagte;

import com.example.comment_oa.util.SendEmail;
import lombok.SneakyThrows;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.JavaDelegate;



public class SendRejectionMail implements JavaDelegate {


    @SneakyThrows
    @Override
    public void execute(DelegateExecution delegateExecution) {
        System.err.println("流程被拒绝！");
//        Object person = delegateExecution.getVariable("person");
//        System.err.println(person);
        Object persongemail = delegateExecution.getVariable("persongemail");
        Object comment = delegateExecution.getVariable("comment");

        SendEmail sendEmail = new SendEmail();
        sendEmail.sendSimpleTextEmail(persongemail.toString(),comment.toString());


    }
}
